﻿
@{
    ViewBag.Title = "入库详情";
    Layout = "~/Views/Shared/_LayoutPage.cshtml";
}
@model IOA.MES.DataAccess.VModel.VInbound


<div id="page"></div>

<script type="text/template" id="tplPage">
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-form layui-card-header layuiadmin-card-header-auto">
                入库单号：@Model.InboundNo，入库人：@Model.CNCreateBy，入库时间：@Model.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")
            </div>
            <div class="layui-card-body">
                <table id="table" lay-filter="table"></table>
            </div>
        </div>
    </div>
</script>

@section Scripts{
    <script>
        var vm = new Vue({
            el: "#page",
            template: "#tplPage",
            data: {
                lang: JSON.parse(lang).package,
                packs: @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model.Packs))
            }
        });

        setTimeout(function () {
            initLayui();
        }, 50);

        function initLayui() {
            layui.use(['table', 'layer', 'laydate', 'form'], function () {
                var table = layui.table;

                var options = {
                    elem: '#table'
                    , data: vm.$data.packs
                    , limit: 1000
                    , cols: [[
                        { title: '序号', type: "numbers", width: 100 }
                        , { field: 'PackNo', title: '打包编号', minWidth:200 }
                        , { field: 'Location', title: '库位号' }
                        , { field: 'QLevel', title: '等级' }
                        , { field: 'ComponentColor', title: '颜色' }
                        , { field: 'IVPowerLevel', title: '功率' }
                        , { field: 'IVCurrentLevel', title: '档位' }
                        , { field: 'NameplateModel', title: '铭牌型号' }
                        , { field: 'Quantity', title: '包装数量' }
                        , { field: 'ProductCode', title: '物料编码' }
                        , { field: 'ProductName', title: '物料型号' }
                        , { field: 'ProductSpecs', title: '物料规格' }
                    ]]
                };
                table.render(options);
            });
        }
    </script>
}
